﻿using System.ComponentModel.DataAnnotations;
using Abp.Authorization.Users;

namespace ARchGL.Platform.Authorization.Users.Profile.Dto
{
    public class CurrentUserProfileUpdateDto
    {
        private string name;
        [Required]
        [StringLength(AbpUserBase.MaxUserNameLength)]
        public string Name
        {
            get => name;
            set => name = value?.Trim();
        }

        [StringLength(AbpUserBase.MaxEmailAddressLength)]
        public string EmailAddress { get; set; }

        private string phoneNumber;
        [StringLength(UserConsts.MaxPhoneNumberLength)]
        public string PhoneNumber
        {
            get => phoneNumber;
            set => phoneNumber = value?.Trim();
        }

        /// <summary>
        /// 头像地址
        /// </summary>
        public string Avatar { get; set; }
        /// <summary>
        /// 职位
        /// </summary>
        public string Position { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        //[Range(1,2,ErrorMessage ="1男；2女")]
        public int Gender { get; set; }
    }
}